#ifndef _GAME_SCENE_HPP_
#define _GAME_SCENE_HPP_

#include <SFML/System/Clock.hpp>

#include <SFML/Graphics/RenderWindow.hpp>

#include <string>
#include <optional>

#include <SFML/Graphics.hpp>

#include <Abracadabra/View/View.hpp>
#include <DotSort/GameRules/TubeSet.hpp>

#include <DotSort/IScene.hpp>

class GameScene : public IScene
{
	public:
		GameScene(sf::RenderWindow* window);
		virtual ~GameScene();

		void load() override;
		void unload() override;

		void update(sf::Time dt) override;
		void processEvent(sf::Event& event) override;
		void draw(sf::RenderWindow* window) const override;

		sf::Texture bg;
		sf::RectangleShape bgs;
	public:
		TubeSet* tubeSet;
		View::View* view;

		std::optional<uint8_t> selectedTube = std::nullopt;

		void onTubeClick(uint8_t index);

		void updateView() const;
};

#endif
